package jmine.tec.rpc.common.entity;

/**
 * Extended REST interface with CRUD services added.
 * 
 * @author fernando.silva
 * @param <R> a class that implements EntityRepresentation interface
 */
public interface CrudEntityRest<R extends EntityRepresentation> extends EntityRest<R> {

    /**
     * Save (creates a new) represented object.
     * 
     * @param representation the representation object.
     */
    void save(R representation);

    /**
     * Updates the represented object on the database.
     * 
     * @param representation the representation object.
     */
    void update(R representation);

    /**
     * Removes the represented object from the database.
     * 
     * @param representation the representation object.
     */
    void remove(R representation);

}
